{% extends 'tpls/base.html' %}
{% load crispy_forms_tags %}

{% block title %}{{ link.title }}{% endblock %}

{% block head %}
    {{ block.super }}
{% endblock %}

{% block content %}
    <main>
        <article>
            <div class="page-title">
                <h1>{{ link.title }}</h1>
            </div>
            <section class="container page-content" style="min-height: 65vh;">
            	<div class="row d-flex align-items-center justify-content-center flex-column text-center">
					{% if message %}
						<h2>{{ message }}</h2>
					{% endif %}

					{% if form %}

						<div class="card text-left" style="width: 100%; max-width: 400px;">
							<div class="card-header">
								<b>Password Required</b>
							</div>
							<div class="card-body">

								<form method='POST'>
									{% csrf_token %}
									{{ form|crispy }}
									{% if referer %}
										<input type="hidden" name="referer" value="{{ referer }}">
									{% endif %}
									<button type="submit" class="btn btn-primary">Submit</button>
								</form>
							</div>
						</div>

					{% endif %}
				</div>
            </section>
        </article>
    </main>
{% endblock %}

